package com.xuan.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author xuan
 * @since 2025-01-12
 */
@Getter
@Setter
@Data
public class Paper implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "pid", type = IdType.AUTO)
    private Integer pid;

    private String title;

    private String author;

    private Integer year;

    private Integer tid;
    @TableField(exist = false)
    private String tname;

    // 逻辑删除字段
    @TableLogic
    private Integer deleted;

    // 自动填充配置
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
